package com.yenroc.invoice.service;


import com.yenroc.invoice.pojo.BaseInvoiceCreateDTO;
import com.yenroc.invoice.pojo.CommonInvoiceDTO;
import com.yenroc.invoice.pojo.ImmovableLeaseInvoiceCreateDTO;
import com.yenroc.invoice.pojo.TransportInvoiceCreateDTO;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class InvoiceServiceFactory {



    public <T extends CommonInvoiceDTO> InvoiceService createInvoiceService(T createDTO) {
//        if (createDTO instanceof BaseInvoiceCreateDTO) {
//            return baseInvoiceService;
//        } else if (createDTO instanceof TransportInvoiceCreateDTO) {
//            return transportInvoiceService;
//        } else if (createDTO instanceof ImmovableLeaseInvoiceCreateDTO) {
//            return immovableLeaseInvoiceService;
//        } else {
//            log.error("不支持的发票版式");
//            throw new IllegalArgumentException("不支持的发票类型");
//        }
        return null;
    }
}